<template>
	<view style="width: 80%; margin: auto; margin-top: 40rpx;" >
		<uni-table :stripe="false" border emptyText="暂无更多数据" >
			<!-- 表头行 -->
			<uni-tr>
				<uni-th class="tab-header" align="center">组名</uni-th>
				<uni-th class="tab-header" align="center">件数</uni-th>
			</uni-tr>
			<!-- 表格数据行 -->
			<uni-tr  v-for="(item, index) in tableData" :key="index">
				<uni-td class="tab-data" align="center">{{item.name}}</uni-td>
				<uni-td class="tab-data" align="center" style="color:#6DB4E2">{{item.total}}</uni-td>
			</uni-tr>
		</uni-table>
	</view>
</template>

<script>
	export default {
		data(){
			return {
				tableData:{},
			}
		},
		mounted(){
			this.api.indexData({}).then((res)=>{
				this.tableData = res.data.data
			})
		}
	}
</script>

<style>
	.tab-header{
		background: #42B5FF;
		font-size: 27rpx;
		font-family: Microsoft YaHei;
		line-height: 26rpx;
		color: #FFFFFF;
		opacity: 1;
	}
	.tab-data{
		font-size: 24rpx;
	}
</style>